<template>
	<view class="u-flex search-box">
		<input class="ipt" type="text" v-model="value" :placeholder="placeholder" />
		<button class="btn" @click="search()">查询</button>
		<!-- <u-button type="primary" :custom-style="{padding:'0 40rpx'}" size="medium" @click="search()">查询</u-button> -->
	</view>
</template>

<script>
	export default {
		props: {
			placeholder: {
				type: String,
				default: "货运订单"
			}
		},
		data() {
			return {
				value: ""
			}
		},
		methods: {
			// 点击查询
			search() {
				this.$emit("search", this.value)
			},
			reset(){
				this.value = ''
			},
		}
	}
</script>

<style scoped lang="scss">
	.search-box {
		margin-top: 20rpx;
		height: 80rpx;
		padding: 0 30rpx;
		justify-content: space-between;
		.ipt {
			width: 440rpx;
			height: 70rpx;
			padding: 0 20rpx;
			border: 1rpx solid #eee;
			border-radius: 5rpx;
			font-size: 30rpx;
			background-color: #FFFFFF;
		}
		.btn {
			width: 160rpx;
			height: 70rpx;
			line-height: 70rpx;
			font-size: 30rpx;
			color: #fff;
			background-color: $uni-color-primary;
			margin: 0;
		}
	}
</style>
